import enum
from dataclasses import dataclass, field
from typing import Any, List

from aiogram.filters.callback_data import CallbackData


@dataclass
class Bots:
    tg_token: str
    admin_id: int
    notification_channel_id: int


@dataclass
class Settings:
    bots: Bots
    is_prod: bool


@dataclass
class Screen:
    content: str | None = None
    keyboard: str | None = None
    video_id: str | None = None
    vide_title: str | None = None


@dataclass
class JSON_Button:
    type: str
    title: str
    data: str


@dataclass
class JSON_VideoItem:
    id: str
    title: str


@dataclass
class JSON_MenuItem:
    name: str
    short: str
    text: str
    children: List[Any] = field(default_factory=lambda: [])
    videos: List[JSON_VideoItem] = field(default_factory=lambda: [])
    buttons: List[JSON_Button] = field(default_factory=lambda: [])


@dataclass
class KB_Item:
    text: str
    cb_data: CallbackData | None = None


# Callbacks
class CB_button(CallbackData, prefix="button"):
    path: str


class CB_screen(CallbackData, prefix="screen"):
    path: str


class CB_video(CallbackData, prefix="video"):
    path: str


class CB_buy_pro(CallbackData, prefix="buy_pro"):
    user_id: int
